package com.zoro.barn.cloud.gateway.security;

import com.zoro.barn.cloud.gateway.loadbalance.WebClientComponent;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author zhaoxingwu
 */
@Configuration
public class SecurityConfig {

    private final WebClientComponent webClientComponent;

    public SecurityConfig(WebClientComponent webClientComponent) {
        this.webClientComponent = webClientComponent;
    }


    @Bean
    public AuthenticationGatewayFilterFactory authenticationGatewayFilter() {
        return new AuthenticationGatewayFilterFactory(webClientComponent);
    }
}
